﻿<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"
    CodeFile="SubCategoryList.aspx.cs" Inherits="Fetco_Category" ValidateRequest="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="titlePlaceHolder" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="menuPlaceHolder" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="contentPlaceHolder" runat="Server">
    <div style="padding-left: 14px;">
        <div class="search">
            <div class="cont">
                <div class="title">
                    <strong>
                        <%=Utilitys.Dictionary["Search"]%>
                        :</strong></div>
                <div class="box_content">
                    <ul>
                        <li>
                            <div style="width: 700; height: 35px;">
                                <div class="divfirst">
                                    <%=Utilitys.Dictionary["Title"]%>
                                    :</div>
                                <div class="divlast">
                                    <asp:TextBox ID="txtTitle" CssClass="tieude" runat="server"></asp:TextBox></div>
                                <div class="divfirst" style="width: 100px;">
                                    <%=Utilitys.Dictionary["Category"]%>
                                    :</div>
                                <div class="divlast" style="width: 265px">
                                    <asp:DropDownList runat="server" ID="ddlCategory">
                                    </asp:DropDownList>
                                    <asp:ImageButton ID="btnSearch" ImageUrl="~/Admin/images/search.jpg" OnClick="btnSearch_OnClick"
                                        runat="server" Style="background-color: Transparent" /></div>
                                <div class="divfirst" style="padding-top: 8px">
                                    <asp:LinkButton CausesValidation="false" CssClass="blue" ID="btnSearchAll" OnClick="btnSearchAll_OnClick"
                                        runat="server"><%=Utilitys.Dictionary["ShowAll"]%></asp:LinkButton></div>
                            </div>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="add_delete">
            <a href="SubCategory.aspx">
                <%=Utilitys.Dictionary["Addnewrow"]%>
            </a>|<asp:LinkButton ID="lbtDelete" OnClick="lbtDelete_Onclick" runat="server" OnClientClick="javascript: return confirm('Bạn có chắc là sẽ xóa dòng này?');"><%=Utilitys.Dictionary["DeleteSeletedRows"]%></asp:LinkButton>
        </div>
        <div>
            <asp:Literal ID="lb_error" runat="server"></asp:Literal>
        </div>
        <div class="display">
            <div class="view">
                <table cellpadding="3" cellspacing="1">
                    <asp:Repeater runat="server" ID="rptList" OnItemDataBound="rptList_OnItemDataBound"
                        OnItemCommand="rptList_OnItemCommand">
                        <HeaderTemplate>
                            <tr>
                                <td align="center" class="head">
                                    <span>
                                        <%=Utilitys.Dictionary["No"]%>
                                    </span>
                                </td>
                                <td align="center" class="head">
                                    <asp:LinkButton ID="lbtNote" runat="server" CommandArgument="ASC" CommandName="sortName"><%=Utilitys.Dictionary["Title"] %></asp:LinkButton>
                                </td>
                                <td align="center" class="head" style="width: 52px;">
                                    <asp:LinkButton ID="lbtCountry" runat="server" CommandArgument="ASC" CommandName="sortOrder"><%=Utilitys.Dictionary["Order"] %></asp:LinkButton>
                                </td>
                                <td align="center" class="head" style="width: 52px;">
                                    <asp:LinkButton ID="LinkButton1" runat="server" CommandArgument="ASC" CommandName="sortCode"><%=Utilitys.Dictionary["Code"] %></asp:LinkButton>
                                </td>
                                <td align="center" class="head">
                                    <asp:LinkButton ID="LinkButton2" runat="server" CommandArgument="ASC" CommandName="sortCategory"><%=Utilitys.Dictionary["Category"] %></asp:LinkButton>
                                </td>
                                <td align="center" id="tdChildHeader" class="head" runat="server">
                                    <a>
                                        <%=Utilitys.Dictionary["ViewSubCat"]%>
                                    </a>
                                </td>
                                <td class="head" align="center">
                                    <input id="checkall" onclick='CheckSelect(this.checked);' type="checkbox" name="checkall">
                                </td>
                            </tr>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr>
                                <td style="text-align: center">
                                    <asp:Literal ID="ltrNo" runat="server"></asp:Literal><asp:HiddenField ID="hidID"
                                        runat="server" />
                                </td>
                                <td>
                                    <a href="SubCategory.aspx?id=<%#Eval("SubCategoryID")%>">
                                        <asp:Literal runat="server" ID="ltrName"></asp:Literal></a>
                                </td>
                                <td>
                                    <asp:TextBox runat="server" ID="txtOrder" Width="50"></asp:TextBox>
                                </td>
                                <td>
                                    <asp:Label runat="server" ID="lbl_code"></asp:Label>
                                </td>
                                <td>
                                    <asp:Literal runat="server" ID="ltrParent"></asp:Literal>
                                </td>
                                <td id="tdChild" align="center" runat="server">
                                    <asp:LinkButton runat="server" ID="lbtSubCat" Text="Xem danh mục con" CommandName="ViewSubcat"
                                        CommandArgument='<%#Eval("SubCategoryID")%>'></asp:LinkButton>
                                </td>
                                <td style="text-align: center">
                                    <input runat="server" onclick="select_change(this.form)" id="chkDelete" type="checkbox"
                                        value='<%# DataBinder.Eval(Container.DataItem, "SubCategoryID") %>' name="delete" />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </table>
            </div>
        </div>
        <div style="padding-top: 12px;" align="center">
            <PagerV2:PagerV2_8 ID="hyperlinkPager" runat="server" CompactModePageCount="5" GenerateFirstLastSection="true"
                OnCommand="pager_Command" GeneratePagerInfoSection="false" GenerateSmartShortCuts="false"
                GenerateHiddenHyperlinks="false" NormalModePageCount="5" />
        </div>
        <div>
            <asp:Button ID="btnSave" OnClick="btnSave_OnClick" runat="server" />&nbsp;&nbsp;<a
                href="javascript:history.go(-1)"><asp:Button ID="btnBack" runat="server" /></a>
        </div>
    </div>

    <script type="text/javascript">
        function confirmdelete()
        {
            return confirm("<%=Utilitys.Dictionary["ConfirmDeleteSelectedRows"]%>");
        }
        var k = document.getElementById("<%=btnSearch.ClientID%>");
        k.value = "<%=Utilitys.Dictionary["Search"]%>";
        var h = document.getElementById("<%=btnSave.ClientID%>");
        h.value = "<%=Utilitys.Dictionary["Update"]%>";
        var i = document.getElementById("<%=btnBack.ClientID%>");
        i.value = "<%=Utilitys.Dictionary["Back"]%>";

    </script>

</asp:Content>
